<!doctype html>
<html class="no-js" lang="en" xmlns:th="http://www.thymeleaf.org">

<head th:replace="common4 :: common_header(~{::title},~{},~{})">
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title>机务段车辆检修维护管理</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- Google Fonts
		============================================ -->
    <style>

    </style>
</head>

<body>

<input type="hidden" id="userId" th:value="${session.user.id}">
<!--[if lt IE 8]>
    <p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<!-- Start Left menu area -->
<div class="left-sidebar-pro">
    <nav id="sidebar" class="">
        <div class="sidebar-header">
            <a href="index.html"><img class="main-logo" th:src="@{/img/LOGO.jpg}" alt=""
                                      style="lwidth: 200;height: 60px;background-size: 100% 100%"/></a>
            <strong><a href="index.html"><img th:src="@{/img/logo/logosn.png}" alt=""/></a></strong>
        </div>
        <div class="left-custom-menu-adp-wrap comment-scrollbar" style="height: 1000px;">
            <nav class="sidebar-nav left-sidebar-menu-pro">
                <!-- 管理员 -->
                <ul class="metismenu nav nav-pills nav-stacked" id="menu1" th:if="${session.user.role}==1">
                    <li>
                        <a title="Landing Page" href="javascript:add('/TLogin/home')" aria-expanded="false">
                            <span class="educate-icon educate-home icon-wrap sub-icon-mg" aria-hidden="true">
                            </span> <span class="mini-click-non">首页</span></a>
                    </li>
                    <li id="usermenu">
                        <a href="#docCollapse" class="nav-header collapsed" data-toggle="collapse" id="collapseParent"
                           onclick="chevron_toggle()">用户管理<span
                                class="pull-right glyphicon glyphicon-chevron-down"></span></a>
                        <ul id="docCollapse" class="nav nav-list collapse">
                            <li>
                                <a title="Landing Page" href="javascript:add('/ZcxUser/ZcxUserHtml')"
                                   aria-expanded="false">
                                    <span class="educate-icon educate-professor icon-wrap" aria-hidden="true"></span>
                                    <span class="mini-click-non">人员管理</span></a>
                            </li>
                            <li>
                                <a title="Landing Page" href="javascript:add('/ZcxJob/ZcxJobHtml')"
                                   aria-expanded="false">
                                    <span class="educate-icon educate-professor icon-wrap" aria-hidden="true"></span>
                                    <span class="mini-click-non">工种管理</span></a>
                            </li>
                            <li>
                                <a title="Landing Page" href="javascript:add('/ZcxDepartment/ZcxDepartmentHtml')"
                                   aria-expanded="false">
                                    <span class="educate-icon educate-professor icon-wrap" aria-hidden="true"></span>
                                    <span class="mini-click-non">车间管理</span></a>
                            </li>
                        </ul>
                    </li>
                    <li>
                        <a title="Landing Page" href="javascript:add('/ZcxTrainInfo/ZcxTrainInfoHtml')"
                           aria-expanded="false">
                            <span class="educate-icon educate-department icon-wrap" aria-hidden="true"></span>
                            <span class="mini-click-non">车辆管理</span></a>
                    </li>

                    <li id="pjmenu">
                        <a href="#docCollapsepj" class="nav-header collapsed" data-toggle="collapse"
                           id="collapseParentpj" onclick="pj_toggle()">配件管理<span
                                class="pull-right glyphicon glyphicon-chevron-down"></span></a>
                        <ul id="docCollapsepj" class="nav nav-list collapse">
                            <li>
                                <a title="Landing Page" href="javascript:add('/ZcxEquipment/ZcxEquipmentHtml')"
                                   aria-expanded="false">
                                    <span class="educate-icon educate-professor icon-wrap" aria-hidden="true"></span>
                                    <span class="mini-click-non">配件管理</span></a>
                            </li>
                            <li>
                                <a title="Landing Page" href="javascript:add('/ZcxEquipmentIn/ZcxEquipmentInHtml')"
                                   aria-expanded="false">
                                    <span class="educate-icon educate-professor icon-wrap" aria-hidden="true"></span>
                                    <span class="mini-click-non">配件进货管理</span></a>
                            </li>
                            <li>
                                <a title="Landing Page" href="javascript:add('/ZcxEquipmentOut/ZcxEquipmentOutHtml')"
                                   aria-expanded="false">
                                    <span class="educate-icon educate-professor icon-wrap" aria-hidden="true"></span>
                                    <span class="mini-click-non">配件出库管理</span></a>
                            </li>
                        </ul>
                    </li>

                    <!--                        <li>-->
                    <!--                            <a title="Landing Page" href="javascript:add('/ZcxDepartment/ZcxDepartmentHtml')" aria-expanded="false">-->
                    <!--                                <span class="educate-icon educate-professor icon-wrap" aria-hidden="true"></span>-->
                    <!--                                <span class="mini-click-non">配件库存管理</span></a>-->
                    <!--                        </li>-->
                    <li id="jxmenu">
                        <a href="#docCollapsejx" class="nav-header collapsed" data-toggle="collapse"
                           id="collapseParentjx" onclick="jx_toggle()">检修管理<span
                                class="pull-right glyphicon glyphicon-chevron-down"></span></a>
                        <ul id="docCollapsejx" class="nav nav-list collapse">
                            <li>
                                <a title="Landing Page" href="javascript:add('/ZcxRepairType/ZcxRepairTypeHtml')"
                                   aria-expanded="false">
                                    <span class="educate-icon educate-professor icon-wrap" aria-hidden="true"></span>
                                    <span class="mini-click-non">检修类型管理</span></a>
                            </li>
                            <li>
                                <a title="Landing Page" href="javascript:add('/ZcxRepairMenu/ZcxRepairMenuHtml')"
                                   aria-expanded="false">
                                    <span class="educate-icon educate-professor icon-wrap" aria-hidden="true"></span>
                                    <span class="mini-click-non">检修清单管理</span></a>
                            </li>
                        </ul>
                    </li>

                </ul>


                <!-- 检修领导 -->
                <ul class="metismenu" id="menu1" th:if="${session.user.role}==2">

                    <li>
                        <a title="Landing Page" href="javascript:add('/TLogin/home')" aria-expanded="false">
                            <span class="educate-icon educate-home icon-wrap sub-icon-mg" aria-hidden="true">
                            </span> <span class="mini-click-non">首页</span></a>
                    </li>
                    <li>
                        <a title="Landing Page" href="javascript:add('/ZcxPlanTask/ZcxPlanTaskHtml')"
                           aria-expanded="false">
                            <span class="educate-icon educate-professor icon-wrap" aria-hidden="true"></span>
                            <span class="mini-click-non">制定检修计划</span></a>
                    </li>
                    <li>
                        <a title="Landing Page" href="javascript:add('/ZcxPlan/ZcxPlanHtml')" aria-expanded="false">
                            <span class="educate-icon educate-professor icon-wrap" aria-hidden="true"></span>
                            <span class="mini-click-non">制定检修任务</span></a>
                    </li>
                    <li>
                        <a title="Landing Page" href="javascript:add('/ZcxPlanDetail/ZcxPlanDetailHtml')"
                           aria-expanded="false">
                            <span class="educate-icon educate-professor icon-wrap" aria-hidden="true"></span>
                            <span class="mini-click-non">分配检修任务</span></a>
                    </li>
                    <li>
                        <a title="Landing Page" href="javascript:add('/ZcxPlanExcute/ZcxPlanExcuteHtml')"
                           aria-expanded="false">
                            <span class="educate-icon educate-data-table icon-wrap sub-icon-mg"
                                  aria-hidden="true"></span>
                            <span class="mini-click-non">检修详情</span></a>
                    </li>
                    <li>
                        <a title="Landing Page" href="javascript:add('/ZcxLeave/ZcxLeaveAuditHtml')"
                           aria-expanded="false">
                            <span class="educate-icon educate-interface icon-wrap" aria-hidden="true">
                            </span> <span class="mini-click-non">请假审批</span></a>
                    </li>
                    <li>
                        <a title="Landing Page" href="javascript:add('/ZcxProblem/ZcxProblemLDHtml')"
                           aria-expanded="false">
                            <span class="educate-icon educate-form icon-wrap" aria-hidden="true">
                            </span> <span class="mini-click-non">问题单审核</span></a>
                    </li>
                    <!-- <li>
                         <a title="Landing Page" href="javascript:add('/ZcxReward/ZcxRewardHtml')" aria-expanded="false">
                             <span class="educate-icon educate-data-table icon-wrap sub-icon-mg" aria-hidden="true"></span>
                             <span class="mini-click-non">奖惩管理</span></a>
                     </li>-->

                </ul>
                <!-- 检修领导 -->
                <ul class="metismenu" id="menu1" th:if="${session.user.role}==5">

                    <li>
                        <a title="Landing Page" href="javascript:add('/TLogin/home')" aria-expanded="false">
                            <span class="educate-icon educate-home icon-wrap sub-icon-mg" aria-hidden="true">
                            </span> <span class="mini-click-non">首页</span></a>
                    </li>
                    <li>
                        <a title="Landing Page" href="javascript:add('/ZcxPlanTask/ZcxPlanTaskHtml')"
                           aria-expanded="false">
                            <span class="educate-icon educate-professor icon-wrap" aria-hidden="true"></span>
                            <span class="mini-click-non">制定检修计划</span></a>
                    </li>
                    <!-- <li>
                         <a title="Landing Page" href="javascript:add('/ZcxReward/ZcxRewardHtml')" aria-expanded="false">
                             <span class="educate-icon educate-data-table icon-wrap sub-icon-mg" aria-hidden="true"></span>
                             <span class="mini-click-non">奖惩管理</span></a>
                     </li>-->

                </ul>


                <!-- 检修人员 -->
                <ul class="metismenu" id="menu1" th:if="${session.user.role}==3">

                    <li>
                        <a title="Landing Page" href="javascript:add('/TLogin/home')" aria-expanded="false">
                            <span class="educate-icon educate-home icon-wrap sub-icon-mg" aria-hidden="true">
                            </span> <span class="mini-click-non">首页</span></a>
                    </li>

                    <li>
                        <a title="Landing Page" href="javascript:add('/ZcxPlanDetailUser/ZcxPlanDetailUserHtml')"
                           aria-expanded="false">
                            <span class="educate-icon educate-department icon-wrap" aria-hidden="true"></span>
                            <span class="mini-click-non">执行检修</span></a>
                    </li>
                    <li>
                        <a title="Landing Page" href="javascript:add('/ZcxPlanExcute/ZcxPlanExcuteJxHtml')"
                           aria-expanded="false">
                            <span class="educate-icon educate-data-table icon-wrap sub-icon-mg"
                                  aria-hidden="true"></span>
                            <span class="mini-click-non">检修详情</span></a>
                    </li>
                    <li>
                        <a title="Landing Page" href="javascript:add('/ZcxProblem/ZcxProblemHtml')"
                           aria-expanded="false">
                            <span class="educate-icon educate-department icon-wrap" aria-hidden="true"></span>
                            <span class="mini-click-non">提交问题单</span></a>
                    </li>
                    <li>
                        <a title="Landing Page" href="javascript:add('/ZcxProblemHandle/ZcxProblemHandleHtml')"
                           aria-expanded="false">
                            <span class="educate-icon educate-department icon-wrap" aria-hidden="true"></span>
                            <span class="mini-click-non">执行维修</span></a>
                    </li>
                    <!--  <li>
                          <a title="Landing Page" href="javascript:add('/KrrCheck/KrrCheckHtml')" aria-expanded="false">
                              <span class="educate-icon educate-data-table icon-wrap sub-icon-mg" aria-hidden="true"></span>
                              <span class="mini-click-non">维修详情</span></a>
                      </li>-->
                    <li>
                        <a title="Landing Page" href="javascript:add('/ZcxLeave/ZcxLeaveHtml')" aria-expanded="false">
                            <span class="educate-icon educate-data-table icon-wrap sub-icon-mg"
                                  aria-hidden="true"></span>
                            <span class="mini-click-non">请假申请</span></a>
                    </li>

                </ul>


                <!-- 检修人员 -->
                <ul class="metismenu" id="menu1" th:if="${session.user.role}==4">

                    <li>
                        <a title="Landing Page" href="javascript:add('/TLogin/home')" aria-expanded="false">
                            <span class="educate-icon educate-home icon-wrap sub-icon-mg" aria-hidden="true">
                            </span> <span class="mini-click-non">首页</span></a>
                    </li>

                    <li>
                        <a title="Landing Page" href="javascript:add('/ZcxProblem/ZcxProblemHtml')"
                           aria-expanded="false">
                            <span class="educate-icon educate-department icon-wrap" aria-hidden="true"></span>
                            <span class="mini-click-non">提交问题单</span></a>
                    </li>


                </ul>
            </nav>
        </div>
    </nav>
</div>
<!-- End Left menu area -->
<!-- Start Welcome area -->
<div class="all-content-wrapper">
    <div class="container-fluid">
        <div class="row">
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="logo-pro">
                    <a href="index.html"><img class="main-logo" th:src="@{/img/logo/logo.png}" alt=""/></a>
                </div>
            </div>
        </div>
    </div>
    <div class="header-advance-area">
        <div class="header-top-area">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                        <div class="header-top-wraper">
                            <div class="row">
                                <div class="col-lg-1 col-md-0 col-sm-1 col-xs-12">
                                    <div class="menu-switcher-pro">
                                        <button type="button" id="sidebarCollapse"
                                                class="btn bar-button-pro header-drl-controller-btn btn-info navbar-btn">
                                            <i class="educate-icon educate-nav"></i>
                                        </button>
                                    </div>
                                </div>
                                <div class="col-lg-6 col-md-7 col-sm-6 col-xs-12">

                                </div>
                                <div class="col-lg-5 col-md-5 col-sm-12 col-xs-12">
                                    <div class="header-right-info">
                                        <ul class="nav navbar-nav mai-top-nav header-right-menu">


                                            <li class="nav-item">
                                                <a href="#" data-toggle="dropdown" role="button" aria-expanded="false"
                                                   class="nav-link dropdown-toggle">
                                                    <img src="img/product/pro4.jpg" alt=""/>
                                                    <span class="admin-name" th:text="${session.user.username}">Prof.Anderson</span>
                                                    <i class="fa fa-angle-down edu-icon edu-down-arrow"></i>
                                                </a>
                                                <ul role="menu"
                                                    class="dropdown-header-top author-log dropdown-menu animated zoomIn"
                                                    style="    padding: 4px 0px;left: -22px;">
                                                    <!--  <li><a href="#"><span class="edu-icon edu-home-admin author-log-ic"></span>My Account</a>
                                                     </li> -->
                                                    <li><a href="javascript:editPwd()"><span
                                                            class="edu-icon edu-locked author-log-ic"></span>个人信息</a>
                                                    <li><a th:href="@{/TLogin/loginout}"><span
                                                            class="edu-icon edu-locked author-log-ic"></span>退出</a>
                                                    </li>
                                                </ul>
                                            </li>

                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- Mobile Menu start -->


    </div>
    <!-- Button start-->


    <div id="tab-content">


    </div>


</div>


<!-- 第一个model 开始 -->
<div id="setModal5" class="modal fade" tabindex="-1" role="dialog" data-backdrop="static" data-keybord="false">
    <div class="modal-dialog" style="max-width:700px">
        <div class="modal-content">
            <div class="modal-header">
                个人信息
            </div>
            <!-- modal-body 开始 -->
            <div class="modal-body">
                <form id="setForm" class="form-horizontal">
                    <input type="hidden" name="id">

                    <div class="form-group row">
                        <label class="col-sm-4 col-form-label text-right" for="username">用户名</label>
                        <div class="col-sm-6">
                            <input class="form-control" name="username" placeholder="请输入用户名"/>
                        </div>
                    </div>
                    <div class="form-group row">
                        <label class="col-sm-4 col-form-label text-right" for="password">密码</label>
                        <div class="col-sm-6">
                            <input class="form-control" type="password" name="password" value="123456"
                                   placeholder="默认密码：123456"/>
                        </div>
                        <label class="col-sm-2 text-center" style="font-size: 12px"></label>
                    </div>
                    <div class="form-group row">
                        <label class="col-sm-4 col-form-label text-right" for="name">姓名</label>
                        <div class="col-sm-6">
                            <input class="form-control" name="name" placeholder="请输入姓名"/>
                        </div>
                    </div>
                    <div class="form-group row">
                        <label class="col-sm-4 col-form-label text-right" for="phone">电话</label>
                        <div class="col-sm-6">
                            <input class="form-control" name="phone" placeholder="请输入电话"/>
                        </div>
                    </div>
                    <div class="form-group row">
                        <label class="col-sm-4 col-form-label text-right" for="address">地址</label>
                        <div class="col-sm-6">
                            <input class="form-control" name="address" placeholder="请输入地址"/>
                        </div>
                    </div>
                </form>
            </div>
            <!-- modal-body 结束 -->
            <div class="modal-footer">
                <button type="button" class="btn btn-info" onclick="editPassword()">
                    <span class="glyphicon glyphicon-ok"></span>保存
                </button>
                <button type="button" class="btn btn-warning" onclick="closeMoal()">
                    <span class="glyphicon glyphicon-remove"></span>关闭
                </button>
            </div>

        </div>
    </div>

</div>
<!-- 第一个model 结束 -->

<script type="text/javascript">
    function chevron_toggle() {
        $("#collapseParent").find("span").toggleClass("glyphicon-chevron-up");
        $("#collapseParent").find("span").toggleClass("glyphicon-chevron-down");
    }

    function pj_toggle() {
        $("#collapseParentpj").find("span").toggleClass("glyphicon-chevron-up");
        $("#collapseParentpj").find("span").toggleClass("glyphicon-chevron-down");
    }

    function jx_toggle() {
        $("#collapseParentpj").find("span").toggleClass("glyphicon-chevron-up");
        $("#collapseParentpj").find("span").toggleClass("glyphicon-chevron-down");
    }

    //初始化图像信息
    function initPortrait(ctrlName, id, url) {
        var control = $('#' + ctrlName);
        var imageurl = url + id + '&r=' + Math.random();

        //重要，需要更新控件的附加参数内容，以及图片初始化显示
        control.fileinput('refresh', {
            uploadExtraData: {id: id},
            initialPreview: [ //预览图片的设置
                "<img src='" + imageurl + "' class='file-preview-image' alt='肖像图片' title='肖像图片'>",
            ],
        });
    }

    $(function () {
        $('.nav h2').on('click', function () {
            //$(this).next('ul').toggle();
            $(this).next('ul').slideToggle();
        })
    })

    function editPwd() {
        $.post("/ZcxUser/get", {id: $("#userId").val()}, function (data) {
            setForm("#setForm", data);
            $('#setModal5').modal('show');

        });

    }

    function closeMoal() {
        $('#setModal5').modal('hide');
    }

    function editPassword() {


        var temp = getFormJson("setForm");
        $.post("/ZcxUser/updateZcxUser", temp, function (data) {


            message.alert(data.showInfo);

            $('#setForm')[0].reset();
            $('#setModal5').modal('hide');
        });

    }

    $(function () {

        $("#tab-content").load("/TLogin/home");
    })

    function add(url) {
        $("#tab-content").load(url);
    }


    //初始化城市
    function getZcxRepairTypeList(id) {
        $.post("/ZcxRepairType/findList", {}, function (data) {
            $('#' + id).empty();
            var html = "";
            html += "<option value=''>--请选择--</option>";
            $.each(data, function (i, val) {
                html += "<option value='" + val.id + "'>" + val.repairTypeName + "</option>";
            });
            $('#' + id).append(html);
        });
    }

    //初始化车间 url:"/ZcxDepartment/query",
    function getCjList(id) {
        $.post("/ZcxDepartment/findList", {}, function (data) {
            $('#' + id).empty();
            var html = "";
            html += "<option value=''>--请选择--</option>";
            $.each(data, function (i, val) {
                html += "<option value='" + val.departmentName + "'>" + val.departmentName + "</option>";
            });
            $('#' + id).append(html);
        });
    }


    //初始化城市
    function getZcxPlanList(id) {
        $.post("/ZcxPlan/findList", {}, function (data) {
            $('#' + id).empty();
            var html = "";
            html += "<option value=''>--请选择--</option>";
            $.each(data, function (i, val) {
                html += "<option value='" + val.id + "'>" + val.planName + "</option>";
            });
            $('#' + id).append(html);
        });
    }


    //初始化城市
    function getZcxEquipmentList(id) {
        $.post("/ZcxEquipment/findList", {}, function (data) {
            $('#' + id).empty();
            var html = "";
            html += "<option value=''>--请选择--</option>";
            $.each(data, function (i, val) {
                html += "<option value='" + val.id + "'>" + val.equipmentName + "</option>";
            });
            $('#' + id).append(html);
        });
    }

    //初始化城市
    function getZcxTrainInfoList(id) {
        $.post("/ZcxTrainInfo/findList", {}, function (data) {
            $('#' + id).empty();
            var html = "";
            html += "<option value=''>--请选择--</option>";
            $.each(data, function (i, val) {
                html += "<option value='" + val.id + "'>" + val.trainNo + "</option>";
            });
            $('#' + id).append(html);
        });
    }

    function getZcxNormalTrainInfoList(id) {
        $.post("/ZcxTrainInfo/findNorMalList", {}, function (data) {
            $('#' + id).empty();
            var html = "";
            html += "<option value=''>--请选择--</option>";
            $.each(data, function (i, val) {
                html += "<option value='" + val.id + "'>" + val.trainNo + "</option>";
            });
            $('#' + id).append(html);
        });
    }

    //初始化城市
    function getZcxUserList(id, role) {
        $.post("/ZcxUser/findList", {role: role}, function (data) {
            $('#' + id).empty();
            var html = "";
            html += "<option value=''>--请选择--</option>";
            $.each(data, function (i, val) {
                html += "<option value='" + val.id + "'>" + val.name + "</option>";
            });
            $('#' + id).append(html);
        });
    }


    //初始化城市
    function getZcxDepartmengList(id) {
        $.post("/ZcxDepartment/findList", {}, function (data) {
            $('#' + id).empty();
            var html = "";
            html += "<option value=''>--请选择--</option>";
            $.each(data, function (i, val) {
                html += "<option value='" + val.id + "'>" + val.departmentName + "</option>";
            });
            $('#' + id).append(html);
        });
    }


    //初始化城市
    function getZcxJobList(id) {
        $.post("/ZcxJob/findList", {}, function (data) {
            $('#' + id).empty();
            var html = "";
            html += "<option value=''>--请选择--</option>";
            $.each(data, function (i, val) {
                html += "<option value='" + val.id + "'>" + val.jobName + "</option>";
            });
            $('#' + id).append(html);
        });
    }

    //初始化城市
    function getZcxEquimentList(id) {
        $.post("/ZcxEquipment/findList", {}, function (data) {
            $('#' + id).empty();
            var html = "";
            html += "<option value=''>--请选择--</option>";
            $.each(data, function (i, val) {
                html += "<option value='" + val.id + "'>" + val.equipmentType + "</option>";
            });
            $('#' + id).append(html);
        });
    }


</script>

</body>

</html>